import React, { Component } from 'react';
import "./viphead.css";

class VipHead extends Component {
    
    //返回
    comeBack(){

        if(this.props.url === undefined){
            this.props.history.goBack();
            return;
        }

        this.props.history.push(this.props.url);
        
        return;
    }

    render() {
        return (
            <div className="vip_question-head">
                <div className="vip_head-wrapper">
                    <i onClick={(e)=>{this.comeBack(e)}} style={{float:'left'}} className="icon iconfont icon-back_light"></i>
                    {this.props.title}
                </div>
            </div>
        );
    }
}

export default VipHead;